/**
 * 
 */
package com.google.code.maven.plugin.http.client;

import org.apache.http.auth.UsernamePasswordCredentials;

/**
 * <h1>Credentials</h1>
 * 
 * @author Nadim Benabdenbi
 * @version 1.0
 * @since JDK1.6
 */
public class Credentials {
	/**
	 * @parameter
	 * @required
	 */
	private String login;
	
	/**
	 * @parameter
	 * @required
	 */
	private String password;
	
	/**
	 * login getter
	 * 
	 * @return the login
	 */
	public String getLogin() {
		return login;
	}
	
	/**
	 * login setter
	 * 
	 * @param login
	 *            the login to set
	 */
	public void setLogin(String login) {
		this.login = login;
	}
	
	/**
	 * password getter.
	 * 
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * password setter.
	 * 
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * @param beanResolver
	 * @return
	 */
	public UsernamePasswordCredentials toUsernamePasswordCredentials() {
		return new UsernamePasswordCredentials(login, password);
	}
}
